
var id = $("#id").val();
$.ajax({
	async: false,
	url:"/www/project/pettags",
	type:"post",
	dataType: 'json',
	success:function(data){
		$('#hotTagList').append(data); 
	}
});
$("#pname").tagEditor({delimiter:','});
console.log($(".tag-editor").html());
$(".pet_tag").click(function(){
  	$('#pname').tagEditor('addTag', $(this).html());
});
$.ajax({
	async: false,
	url:"/www/master/master_project/"+id,
	type:"post",
	dataType: 'json',
	success:function(data){
		$('.tag-editor').append(data); 
	}	
});


$("#province").change(function(){
	var province = $("#province").val();
	province = province.substr(0,6); //字符分割 
	$.ajax({
		url:"/www/master/city/"+province,
		type:"post",
		dataType: 'json',
		success:function(data){
			$('#city').empty(); 
			$('#city').append(data.city);
			$('#county').empty(); 
			$('#county').append(data.county);
		}	
	});
});

$("#city").change(function(){
	var city = $("#city").val();
	city = city.substr(0,6); //字符分割 
	$.ajax({
		url:"/www/master/county/"+city,
		type:"post",
		dataType: 'json',
		success:function(data){
			$('#county').empty(); 
			$('#county').append(data.county);
		}	
	});
});
